import java.util.Scanner;

public class Method {
    public static void main(String[] args) {

        //录入信息
        Scanner sc = new Scanner(System.in);
        System.out.println("输入机票原价");
        int t = sc.nextInt();
        System.out.println("输入当前月份");
        int m = sc.nextInt();
        System.out.println("输入购买舱位");//头等舱0，经济舱1
        int s = sc.nextInt();

        //判断旺季淡季
        if(m>=5&&m<=10){
            //旺季
            t = getT(s, t,0.9,0.85);
        } else if ((m>=1&&m<=4)||(m>=11&&m<=12)) {
            //淡季
            t = getT(s, t,0.7,0.65);
        } else {
            System.out.println("输入的月份不合法");
        }

        System.out.println(t);
    }

    //计算票价
    private static int getT(int s, int t,double v0,double v1) {
        //判断舱型
        if(s ==0){
            t =(int)(t *v0);
        } else if (s ==1) {
            t =(int)(t *v1);
        }else {
            System.out.println("没有这个舱位");
        }
        return t;
    }
}
